﻿using System;
using System.Data;
using System.Text;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using AnyOffice.Components;
using AnyOffice.DAL;

namespace AnyOffice.general.calendar.manage
{
    public partial class manage : ModulePage
    {
 
        protected void Page_Load(object sender, EventArgs e)
        {
            DateTime specifyDate = (Request.QueryString["date"] != null) ? DateTime.Parse(Request.QueryString["date"].ToString()) : DateTime.Now;
            this.ViewState["SpecifyDate"] = specifyDate.ToString("yyyy-MM-dd");
            this.litToday.Text = this.litToday2.Text = specifyDate.ToString("yyyy年M月d日");
            DataTable table = new CalendarDao().SpecifyDay(base.Conn, base.User.Identity.Name, specifyDate);
            this.rptCalendar.DataSource = table;
            this.rptCalendar.DataBind();
            if (table.Rows.Count > 0)
            {
                this.rptCalendar.Visible = true;
            }
            else
            {
                this.litMessage.Text = base.ShowMessage("无日程安排");
            }
        } 

    }
}
